package org.example.ch04;

/**
 * 斐波那契
 *
 */
public class Factorial {

    public static void main(String[] args) {
        int result = solution1(3);
        System.out.println(result);
    }

    public static int solution1(int n){
        if(n<=1){
            return n;
        }
        return n * solution1(n-1);
    }
}
